import 'dart:collection';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import 'my_theme.dart';

class GradientAppbar extends StatelessWidget implements PreferredSizeWidget {
  final Widget child;

  const GradientAppbar({Key? key, required this.child}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return PreferredSize(
      preferredSize: const Size(300, 100),
      child: Container(
        height: kIsWeb ? 70 : 100,
        alignment: AlignmentDirectional.bottomCenter,
        padding: const EdgeInsets.only(left: 22, bottom: 16, right: 20),
        decoration: BoxDecoration(
            gradient: LinearGradient(colors: [
          MyTheme.gradientStart,
          MyTheme.gradientEnd,
        ])),
        child: child,
      ),
    );
  }

  @override
  // TODO: implement preferredSize
  Size get preferredSize => Size(300, kIsWeb ? 100 : 100);
}
